home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 126-150 / disk_146 / dmemacros / .edrc next >
Text File  |  1992-05-06  |  6KB  |  171 lines

  1. # left and right cursor-keys with line-wraparound
  2.  
  3. map `left'   `ifelse l `if !t `up last'' left'
  4. map `right'  `ifelse r `if !b `down first'' right'
  5.  
  6.  
  7. # shift-(cursor key): up and down one page, left and right one word
  8.  
  9. map `s-up'   `pageup'
  10. map `s-dow'  `pagedown'
  11. map `s-lef'  `wleft'
  12. map `s-rig'  `wright'
  13.  
  14.  
  15. # alt-(cursor key): top and bottom of screen, left and right 40 characters
  16.  
  17. map `a-up'   `screentop'
  18. map `a-dow'  `screenbottom'
  19. map `a-lef'  `repeat 40 left'
  20. map `a-rig'  `repeat 40 right'
  21.  
  22.  
  23. # shift-alt-(cursor key): top and bottom of file, first and last character of line
  24.  
  25. map `sa-up'  `top'
  26. map `sa-dow' `bottom'
  27. map `sa-lef' `first'
  28. map `sa-rig' `last'
  29.  
  30.  
  31. # ctrl-(cursor key): scroll up and down
  32.  
  33. map `c-up'   `scrollup'
  34. map `c-dow'  `scrolldown'
  35.  
  36.  
  37. # allow use of mouse to select, copy and delete blocks of text; separate clipboards are maintained for the left and right mouse-buttons;
  38. # shift-(left-mouse-button click): define start and end of current block; automatically copies block into left clipboard; automatically undefines old block
  39. # ctrl-(left-mouse-button click): goto start of current block
  40. # alt-(left-mouse-button click): goto end of current block
  41. # shift-alt-(left-mouse-button click): copy contents of left clipboard above to the line clicked upon
  42. # ctrl-shift-alt-(left-mouse-button click): delete current block after copying it into left clipboard
  43.  
  44. resettoggle 179
  45. map `sL-lmb'   `if 179 unblock tomouse block ifelse cb `bsave ram:dme.L.clip settoggle 179' `resettoggle 179''
  46. map `cL-lmb'   `goto start'
  47. map `aL-lmb'   `goto end'
  48. map `saL-lmb'  `tomouse insfile ram:dme.L.clip'
  49. map `csaL-lmb' `bsave ram:dme.L.clip bdelete'
  50.  
  51.  
  52. # same as definitions above, except utilize right mouse-button and operate upon the right clipboard
  53.  
  54. map `sR-rmb'   `if 179 unblock tomouse block ifelse cb `bsave ram:dme.R.clip settoggle 179' `resettoggle 179''
  55. map `cR-rmb'   `goto start'
  56. map `aR-rmb'   `goto end'
  57. map `saR-rmb'  `tomouse insfile ram:dme.R.clip'
  58. map `csaR-rmb' `bsave ram:dme.R.clip bdelete'
  59.  
  60.  
  61. # return:    return-with-indent which handles DME bug of adding 2 lines at the end of a file;
  62. # shift-return: return-with-indent-and-text-split which handles DME bug of adding 2 lines at the end of a file;
  63.  
  64. map `return'   `last  ifelse b `split firstnb down down deline' `split firstnb down'  '
  65. map `s-return' `ifelse  b  `split down down deline up firstnb'  `split firstnb'  repeat cleft `first down ` ' up'  firstnb down'
  66.  
  67.  
  68. # del:         TRUE delete, including end-of-line join; handles rich and varied set of bugs with join command
  69. # shift-del:     TRUE word-delete, etc.
  70. # shift-alt-del: line-delete
  71.  
  72. map `del'    `ifelse !r del `ifelse l `if !b deline' `resettoggle 1 resettoggle 2 source ram:join.edrc'''
  73. map `s-del'  `ifelse ca `resettoggle 0' `settoggle 0' settoggle 3 while 3 `ifelse !r del `ifelse l `if !b deline' `resettoggle 1 resettoggle 2 source ram:join.edrc'' ifelse 0 `resettoggle 3' `if !ca `resettoggle 3''''
  74. map `sa-del' `deline'
  75.  
  76.  
  77. # bs:        TRUE backspace, including end-of-line join; handles rich and varied set of bugs with join command
  78. # shift-bs:    TRUE word-backspace, etc.
  79. # shift-alt-bs: line-delete
  80.  
  81. map `bs'     `ifelse l `ifelse t up `up last'' left ifelse !r del `ifelse l `if !b deline' `resettoggle 1 resettoggle 2 source ram:join.edrc'''
  82. map `s-bs'   `settoggle 3 while 3 `ifelse l `ifelse t up `up last'' left ifelse l `resettoggle 3' `left if !ca `resettoggle 3' right' if !ca `resettoggle 3' ifelse !r del `ifelse l `if !b deline' `resettoggle 1 resettoggle 2 source ram:join.edrc''''
  83. map `sa-bs'  `deline'
  84.  
  85.  
  86. # prompt: replace current file with new one; prompt: open new window with new file
  87.  
  88. map `f1'     `escimm `newfile ''
  89. map `s-f1'   `escimm `newwindow newfile ''
  90.  
  91.  
  92. # prompt: insert file before current line; prompt: change name of current file
  93.  
  94. map `f2'     `escimm `insfile ''
  95. map `s-f2'   `escimm `chfilename ''
  96.  
  97.  
  98. #prompt: save file as ?; save current file
  99.  
  100. map `f3'     `escimm `saveas ''
  101. map `s-f3'   `saveold'
  102.  
  103.  
  104. #safe quit; save current file then quit
  105.  
  106. map `f4'     `quit'
  107. map `s-f4'   `saveold quit'
  108.  
  109.  
  110. #execute the right and left clipboards as macros
  111.  
  112. map `f5'     `source dme.R.clip'
  113. map `s-f5'   `source dme.L.clip'
  114.  
  115.  
  116. # open small windows to view contents of the left and right clipboards
  117.  
  118. map `f6'     `topedge 12 height 45 newwindow newfile dme.R.clip topedge 1 height 360'
  119. map `s-f6'   `topedge 58 height 45 newwindow newfile dme.L.clip topedge 1 height 360'
  120.  
  121. # find previous occurrence of find-string
  122. # find/replace previous occurrence of find-string; differs from prevr in that it will change word under the cursor (allowing you to selectively find-and-replace with a minimum of keystrokes)
  123. # prompt: find/replace all previous occurrences of find-string
  124.  
  125. map `f7'     `prev'
  126. map `s-f7'   `ifelse r `if !b `down first'' `right' prevr'
  127. map `sa-f7'  `escimm `ifelse r  `if !b `down first'' `right'  prevr  repeat -1 prevr''
  128.  
  129.  
  130. # find next occurrence of find-string
  131. # find/replace next occurrence of find-string; differs from findr in that it will change word under the cursor (allowing you to selectively find-and-replace with a minimum of keystrokes)
  132. # prompt: find/replace all subsequent occurrences of find-string
  133.  
  134. map `f8'     `next'
  135. map `s-f8'   `ifelse l `if !t `up last'' `left' nextr'
  136. map `sa-f8'  `escimm `ifelse l  `if !t `up last'' `left'  nextr  repeat -1 nextr''
  137.  
  138.  
  139. # prompt: define find-string and search for previous occurrence of it
  140. # prompt: define find-string and replace-string and search for previous occurrence of find-string
  141.  
  142. map `f9'     (escimm (findstr `) prev)
  143. map `s-f9'   (escimm (findstr `) escimm (repstr `) prev)
  144.  
  145.  
  146. # prompt: define find-string and search for next occurrence of it
  147. # prompt: define find-string and replace-string and search for next occurrence of find-string
  148.  
  149. map `f10'    (escimm (findstr `) next)
  150. map `s-f10'  (escimm (findstr `) escimm (repstr `) next)
  151.  
  152.  
  153. # miscellaneous
  154.  
  155. map `c-g'    `escimm `goto ''
  156. map `c-k'    `remeol'
  157. map `tab'    `tab'
  158. map `s-tab'  `backtab'
  159.  
  160.  
  161. insertmode on
  162. savetabs on
  163. tabstop 3
  164. pageset 96
  165.  
  166.  
  167. # this macro is required for the del-key and bs-key definitions; if you use this macro in your .edrc file, be sure to change the pathname to that of the directory containing your copy of the join macro
  168.  
  169. execute `copy "Macro Disk:s/join.edrc"   ram:'
  170.  
  171.